﻿package export.hero
{
	
	import base.BaseAddEffect;
	import base.BaseBitmapDataClip;
	import base.BaseBitmapDataPool;
	import base.BaseHero;
	import base.BaseMonster;
	import base.BaseObject;
	
	import com.dusk.util.ResUtil;
	import com.game.data.vo.EquipmentVO;
	import com.game.data.vo.SkillVO;
	import com.game.engine.MainGame;
	import com.game.event.GameEventType;
	import com.game.manager.EventManager;
	import com.game.manager.SoundManager;
	import com.greensock.TweenMax;
	
	import export.bullet.FollowTargetBullet;
	import export.bullet.SpecialEffectBullet;
	import export.bullet.StabBullet;
	
	import flash.display.Sprite;
	import flash.events.KeyboardEvent;
	import flash.geom.Point;
	import flash.utils.getTimer;
	
	public class Role3 extends BaseHero
	{
		
		public function Role3()
		{
			super();
			this.horizonSpeed = 6;
			this.attackBackInfoDict["hit1"] = {
				"hitMaxCount"    : 999,
				"attackBackSpeed": [5, -3],
				"attackInterval" : 999,
				"attackKind"     : "physics",
				"addprotection"  : 2
			};
			this.attackBackInfoDict["hit2"] = {
				"hitMaxCount"    : 20,
				"attackBackSpeed": [0.5, -3],
				"attackInterval" : 999,
				"attackKind"     : "physics",
				"addprotection"  : 2
			};
			this.attackBackInfoDict["hit3"] = {
				"hitMaxCount"    : 20,
				"attackBackSpeed": [0.5, -3],
				"attackInterval" : 999,
				"attackKind"     : "physics",
				"addprotection"  : 2
			};
			this.attackBackInfoDict["hit4"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [-30, -3],
				"attackInterval" : 999,
				"attackKind"     : "physics",
				"addprotection"  : 3
			};
			this.attackBackInfoDict["hit5"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [0, -2],
				"attackInterval" : 999,
				"attackKind"     : "magic",
				"addprotection"  : 0
			};
			this.attackBackInfoDict["hit6"] = {
				"hitMaxCount"    : 99,
				"attackBackSpeed": [0, -2],
				"attackInterval" : 5,
				"attackKind"     : "physics",
				"addprotection"  : 0
			};
			this.attackBackInfoDict["hit7_1"] = {
				"hitMaxCount"    : 1,
				"attackBackSpeed": [0, -2],
				"attackInterval" : 4,
				"attackKind"     : "physics",
				"addprotection"  : 0
			};
			this.attackBackInfoDict["hit7_2"] = {
				"hitMaxCount"    : 999,
				"attackBackSpeed": [-30, -2],
				"attackInterval" : gc.frameClips,
				"attackKind"     : "physics",
				"addprotection"  : 3.5
			};
			this.attackBackInfoDict["hit8_1"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [2, -22],
				"attackInterval" : 2,
				"attackKind"     : "magic",
				"addprotection"  : 0
			};
			this.attackBackInfoDict["hit8_2"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [10, -4],
				"attackInterval" : 8,
				"attackKind"     : "magic",
				"addprotection"  : 2
			};
			this.attackBackInfoDict["hit9"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [-5, -4],
				"attackInterval" : 7,
				"attackKind"     : "physics",
				"addprotection"  : 3
			};
			this.attackBackInfoDict["hit10"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [-15, -2],
				"attackInterval" : 7,
				"attackKind"     : "magic",
				"addprotection"  : 1.5
			};
			this.attackBackInfoDict["hit11"] = {
				"hitMaxCount"    : 100,
				"attackBackSpeed": [0, 0],
				"attackInterval" : 7,
				"attackKind"     : "magic",
				"addprotection"  : 2.5
			};
			this.attackBackInfoDict["hit12"] = {
				"hitMaxCount"    : 1,
				"attackBackSpeed": [0, 0],
				"attackInterval" : 999,
				"attackKind"     : "physics",
				"addprotection"  : 1
			};
		}
		
		private var isHit6Ok:Boolean = false;
		
		override protected function initBBDC():void
		{
			var _loc1_:* = null;
			var _loc2_:* = null;
			var _loc3_:uint = this.getCurClothId();
			var _loc4_:uint = this.getCurWeaponId();
			var _loc5_:Array = BaseBitmapDataPool.getRoleBitmapDataArrayByName("ROLE3_" + _loc3_);
			var _loc6_:Array = BaseBitmapDataPool.getRoleBitmapDataArrayByName("ROLE3_EQUIP_" + _loc4_);
			if (_loc5_)
			{
				_loc1_ = {"name": "body", "source": _loc5_};
				_loc2_ = {"name": "equip", "source": _loc6_};
				bbdc = new BaseBitmapDataClip([_loc1_, _loc2_], 5 * 60, 200, new Point(0, 0));
				bbdc.setOffsetXY(-15, 0);
				bbdc.setFrameStopCount([[2, 2, 2, 3, 2, 4], [3, 3, 3, 9, 5, 9], [4, 4, 4, 4], [2, 2, 2, 2], [1, 1, 15, 6, 2, 160], [2, 2, 2, 2, 2], [2, 2, 6], [2, 2, 6], [2, 2, 2, 10], [24, 2, 8], [2, 2, 20], [2, 2, 2, 20], [2, 2, 2, 20], [2, 2, 15]]);
				bbdc.setFrameCount([36, 6, 4, 4, [1, 1, 1, 1, 1, 1], 5, 3, 3, 4, 3, 3, 4, 4, 3]);
				bbdc.setEnterFrameCallBack(this.enterFrameFunc, this.exitFrameFunc);
				bbdc.setAddScriptWhenFrameOver(this.scriptFrameOverFunc);
				this.bodyContainer.addChild(bbdc);
				this.bbdc.turnRight();
				return;
			}
			throw new Error("ROLE3--BitmapData Error!");
		}
		
		override protected function initCollideArea():void
		{
			this.colipse = ResUtil.getNewObj("ObjectBaseSprite") as Sprite;
			this.colipse.visible = false;
			this.addChild(this.colipse);
		}
		
		override public function setAction(param1:String):void
		{
			super.setAction(param1);
			var _loc2_:Point = this.bbdc.getCurPoint();
			switch (param1)
			{
				case "idle":
					if (_loc2_.y != 0)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(0);
					}
					this.bbdc.setState(param1);
					break;
				case "idle2":
					if (_loc2_.y != 1)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(1);
					}
					this.bbdc.setState(param1);
					break;
				case "walk":
					if (_loc2_.y != 2)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(2);
					}
					this.bbdc.setState(param1);
					break;
				case "run":
					if (_loc2_.y != 3)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(3);
					}
					this.bbdc.setState(param1);
					break;
				case "jump1":
					if (_loc2_.x != 0 || _loc2_.y != 4)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(4);
					}
					this.bbdc.setState(param1);
					break;
				case "jump2":
					if (_loc2_.y != 5)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(5);
					}
					this.bbdc.setState(param1);
					break;
				case "jump3":
					if (_loc2_.x != 1 || _loc2_.y != 4)
					{
						this.bbdc.setFramePointX(1);
						this.bbdc.setFramePointY(4);
					}
					this.bbdc.setState(param1);
					break;
				case "hit1":
					if (_loc2_.y != 6)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(6);
					}
					this.bbdc.setState(param1);
					break;
				case "hit2":
					if (_loc2_.y != 7)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(7);
					}
					this.bbdc.setState(param1);
					break;
				case "hit3":
					if (_loc2_.y != 8)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(8);
					}
					this.bbdc.setState(param1);
					break;
				case "hit4":
					if (_loc2_.y != 9)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(9);
					}
					this.bbdc.setState(param1);
					break;
				case "hit5":
					if (_loc2_.x != 5 || _loc2_.y != 4)
					{
						this.bbdc.setFramePointX(5);
						this.bbdc.setFramePointY(4);
					}
					this.bbdc.setState(param1);
					break;
				case "hit6":
					if (_loc2_.x != 3 || _loc2_.y != 4)
					{
						this.bbdc.setFramePointX(3);
						this.bbdc.setFramePointY(4);
					}
					this.bbdc.setState(param1);
					break;
				case "hit7":
					if (_loc2_.y != 10)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(10);
					}
					this.bbdc.setState(param1);
					break;
				case "hit8":
					if (_loc2_.y != 11)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(11);
					}
					this.bbdc.setState(param1);
					break;
				case "hit9":
					if (_loc2_.y != 12)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(12);
					}
					this.bbdc.setState(param1);
					break;
				case "hit10":
					if (_loc2_.y != 13)
					{
						this.bbdc.setFramePointX(0);
						this.bbdc.setFramePointY(13);
					}
					this.bbdc.setState(param1);
					break;
				case "hit11":
					if (_loc2_.x != 4 || _loc2_.y != 4)
					{
						this.bbdc.setFramePointX(4);
						this.bbdc.setFramePointY(4);
					}
					this.bbdc.setState(param1);
					break;
				case "hit11Frame2":
					if (_loc2_.x != 5 || _loc2_.y != 4)
					{
						this.bbdc.setFramePointX(5);
						this.bbdc.setFramePointY(4);
					}
					this.bbdc.setState(param1);
					break;
				case "hit12":
					if (_loc2_.x != 5 || _loc2_.y != 4)
					{
						this.bbdc.setFramePointX(5);
						this.bbdc.setFramePointY(4);
					}
					this.bbdc.setState(param1);
					break;
				case "hurt":
					if (_loc2_.x != 2 || _loc2_.y != 4)
					{
						this.bbdc.setFramePointX(2);
						this.bbdc.setFramePointY(4);
					}
					this.bbdc.setState(param1);
			}
		}
		
		override protected function scriptFrameOverFunc(param1:int):void
		{
			var _loc2_:String = this.bbdc.getState();
			switch (_loc2_)
			{
				case "idle":
					this.setAction("idle2");
					break;
				case "idle2":
					this.setAction("idle");
					break;
				case "walk":
					this.bbdc.setFramePointX(0);
					break;
				case "run":
					this.bbdc.setFramePointX(0);
					break;
				case "jump1":
					this.bbdc.setFramePointX(0);
					break;
				case "jump2":
					this.setAction("jump3");
					break;
				case "jump3":
					this.bbdc.setFramePointX(1);
					break;
				case "hit1":
					this.setAction("idle");
					break;
				case "hit2":
					this.setAction("idle");
					break;
				case "hit3":
					this.setAction("idle");
					break;
				case "hit4":
					this.setAction("idle");
					break;
				case "hit5":
					this.setAction("idle");
					break;
				case "hit6":
					this.setAction("idle");
					break;
				case "hit7":
					this.setAction("idle");
					break;
				case "hit8":
					this.setAction("idle");
					break;
				case "hit9":
					this.setAction("idle");
					break;
				case "hit10":
					this.setStatic();
					this.setAction("idle");
					break;
				case "hit11":
					this.setAction("hit11Frame2");
					break;
				case "hit11Frame2":
					this.getBBDC().show();
					this.setAction("idle");
					break;
				case "hit12":
					this.lastHit = "";
					this.getBBDC().show();
					this.setAction("idle");
					break;
				case "hurt":
					this.setStatic();
					this.getBBDC().show();
					this.setAction("idle");
			}
		}
		
		override protected function enterFrameFunc(param1:Point):void
		{
			var _loc2_:String = this.bbdc.getState();
			var _loc3_:Point = new Point();
			switch (_loc2_)
			{
				case "hit1":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 2)
						{
							if (param1.x == 1)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x - 130;
								}
								else
								{
									_loc3_.x = this.x + 130;
								}
								_loc3_.y = this.y - 72;
								this.doHit1(this.getBBDC().getDirect(), _loc3_);
								break;
							}
							break;
						}
						break;
					}
					break;
				case "hit2":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 2)
						{
							if (param1.x == 1)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x - 140;
								}
								else
								{
									_loc3_.x = this.x + 140;
								}
								_loc3_.y = this.y - 30;
								this.doHit2(this.getBBDC().getDirect(), _loc3_);
								break;
							}
							break;
						}
						break;
					}
					break;
				case "hit3":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 2)
						{
							if (param1.x == 2)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x - 180;
								}
								else
								{
									_loc3_.x = this.x + 3 * 60;
								}
								_loc3_.y = this.y - 140;
								this.doHit3(this.getBBDC().getDirect(), _loc3_);
								break;
							}
							break;
						}
						break;
					}
					break;
				case "hit4":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 24)
						{
							if (param1.x == 0)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x - 35;
								}
								else
								{
									_loc3_.x = this.x + 35;
								}
								_loc3_.y = this.y - 55;
								this.doHit4(this.getBBDC().getDirect(), _loc3_);
								break;
							}
							break;
						}
						break;
					}
					break;
				case "hit5":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 160)
						{
							if (param1.x == 5)
							{
								this.bbdc.setCurFrameCount(4);
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x - 70;
								}
								else
								{
									_loc3_.x = this.x + 70;
								}
								_loc3_.y = this.y - 110;
								this.doHit5(this.getBBDC().getDirect(), _loc3_);
								break;
							}
							break;
						}
						break;
					}
					break;
				case "hit6":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 6)
						{
							if (param1.x == 3)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x - 120;
								}
								else
								{
									_loc3_.x = this.x + 2 * 60;
								}
								_loc3_.y = this.y - 115;
								this.doHit6(this.getBBDC().getDirect(), _loc3_);
								break;
							}
							break;
						}
						break;
					}
					break;
				case "hit7":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 20)
						{
							if (param1.x == 2)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x - 140;
								}
								else
								{
									_loc3_.x = this.x + 140;
								}
								_loc3_.y = this.y - 160;
								this.doHit7_1(this.getBBDC().getDirect(), _loc3_);
							}
						}
						if (this.bbdc.getCurFrameCount() == 8)
						{
							if (param1.x == 2)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x - 135;
								}
								else
								{
									_loc3_.x = this.x + 135;
								}
								_loc3_.y = this.y - 145;
								this.doHit7_2(this.getBBDC().getDirect(), _loc3_);
								break;
							}
							break;
						}
						break;
					}
					break;
				case "hit8":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 20)
						{
							if (param1.x == 3)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x - 95;
								}
								else
								{
									_loc3_.x = this.x + 95;
								}
								_loc3_.y = this.y;
								this.doHit8_1(this.getBBDC().getDirect(), _loc3_);
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x + 20;
								}
								else
								{
									_loc3_.x = this.x - 20;
								}
								_loc3_.y = this.y - 20;
								this.doHit8_2(this.getBBDC().getDirect(), _loc3_);
								break;
							}
							break;
						}
						break;
					}
					break;
				case "hit9":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 20)
						{
							if (param1.x == 3)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x - 195;
								}
								else
								{
									_loc3_.x = this.x + 195;
								}
								_loc3_.y = this.y - 160;
								this.doHit9(this.getBBDC().getDirect(), _loc3_);
								break;
							}
							break;
						}
						break;
					}
					break;
				case "hit10":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 25)
						{
							if (param1.x == 2)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x - 55;
								}
								else
								{
									_loc3_.x = this.x + 55;
								}
								_loc3_.y = this.y - 25;
								this.doHit10(this.getBBDC().getDirect(), _loc3_);
							}
						}
					}
					if (param1.x == 2)
					{
						if (this.getBBDC().getDirect() == 0)
						{
							this.velocity.x = -15;
							break;
						}
						this.velocity.x = 15;
						break;
					}
					break;
				case "hit11Frame2":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 160)
						{
							if (param1.x == 5)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x - 135;
								}
								else
								{
									_loc3_.x = this.x + 135;
								}
								_loc3_.y = this.y - 90;
								this.doHit11(this.getBBDC().getDirect(), _loc3_);
								this.bbdc.setCurFrameCount(28);
							}
						}
					}
					this.getBBDC().hide();
					break;
				case "hit12":
					if (gc.sid == this.sid || gc.isSingleGame())
					{
						if (this.bbdc.getCurFrameCount() == 160)
						{
							if (param1.x == 5)
							{
								if (this.bbdc.getDirect() == 0)
								{
									_loc3_.x = this.x;
								}
								else
								{
									_loc3_.x = this.x;
								}
								_loc3_.y = this.y;
								this.doHit12_1(this.getBBDC().getDirect(), _loc3_);
								break;
							}
							break;
						}
						if (this.bbdc.getCurFrameCount() == 150)
						{
							this.getBBDC().hide();
							break;
						}
						break;
					}
			}
		}
		
		override protected function exitFrameFunc(param1:Point):void
		{
		}
		
		override public function step():void
		{
			super.step();
		}
		
		override public function reduceHp(param1:int, param2:Boolean = false):void
		{
			if (this.curAddEffect && (this.curAddEffect.hasEffect(BaseAddEffect.BAJIE_DUNPAI_BUFF) || this.curAction == "hit12"))
			{
				param2 = false;
				param1 *= 1 - 0.01 * this.getPlayer().returnSkillLevelBySkillName("sd");
			}
			if (this.isGXP)
			{
				param1 *= 0.45;
			}
			super.reduceHp(param1, param2);
		}
		
		override public function setAttackBack(param1:Point):void
		{
			if (!(this.curAddEffect.hasEffect(BaseAddEffect.BAJIE_DUNPAI_BUFF) || this.curAction == "hit12"))
			{
				super.setAttackBack(param1);
			}
		}
		
		override protected function myKeyDown(param1:String):*
		{
			/**
			 * 按键代码：s,j,k,w;
			 */
			var keyStr:String = param1;
			super.myKeyDown(keyStr);
			if (canNextAction)
			{
				switch (keyStr)
				{
					case "0010":
						if (this.isAttacking() || this.isBeAttacking())
						{
							return;
						}
						this.jump();
						canNextAction = false;
						break;
					case "0100":
					case "1100":
						if (this.isAttacking() || this.isBeAttacking())
						{
							return;
						}
						this.normalAttack();
						canNextAction = false;
						break;
					case "1010":
						if (this.isAttacking() || this.isBeAttacking())
						{
							return;
						}
						this.getDownStair();
						canNextAction = false;
						break;
					case "0110":
						if (this.isAttacking() || this.isBeAttacking())
						{
							return;
						}
						canNextAction = false;
						break;
					case "0101":
						if (this.getPlayer().isstudyskill[3] != 1)
						{
							return;
						}
						if (this.isAttacking() || this.isBeAttacking())
						{
							return;
						}
						if (this.roleProperties.mp >= 20)
						{
							SoundManager.playSound("Role3_hit6");
							this.lastHit = "hit8";
							this.curAction = "hit8";
							this.normalAttackNum = 0;
							this.timers = 40;
							
							roleProperties.reduceMp(20);
							break;
						}
						this.normalAttack();
						canNextAction = false;
						break;
					case "0001":
						if (this.checkTransferDoor())
						{
							gc.pWorld.getBaseLevelListener().keyBoardDownForW(this);
							if (gc.curStage == 8 && gc.curLevel == 1)
							{
								return;
							}
						}
						if (!MainGame.getIns().battleData.levelCleared && this.checkTransferDoor())
						{
							MainGame.getIns().battleData.levelCleared = true;
							gc.keyboardControl.destroy();
							TweenMax.to(gc.gameInfo, 1, {"alpha": 0});
							TweenMax.to(gc.gameScene, 1, {
								"alpha": 0, "onComplete": function ():*
								{
									EventManager.getIns().dispatchEvent(GameEventType.GAME_VICTOR);
								}
							});
							break;
						}
				}
			}
		}
		
		override protected function showSkill(index:int = 0):void
		{
			if(!getPlayer()) return;
			var skill:SkillVO = getPlayer().getCurRoleData().getEquippedSkillByIndex(index);
			if(!skill) return;
			var mpCost:int = gc.configManager.skillProxy.getSkillMpCostBySkillId(skill.skillId,skill.skillLevel);
			switch(skill.skillId)
			{
				case "dj":
					skill_dj(mpCost)
					break;
				case "sd":
					skill_sd(mpCost)
					break;
				case "zznh":
					skill_zznh(mpCost)
					break;
				case "syzq":
					skill_syzq(mpCost)
					break;
				case "ssp":
					skill_ssp(mpCost)
					break;
				case "jsp":
					skill_jsp(mpCost)
					break;
				case "dgq":
					skill_dgq(mpCost)
					break;
				case "xgq":
					skill_xgq(mpCost)
					break;
				case "tmc":
					skill_tmc(mpCost)
					break;
				case "rj":
				default:
					break;
			}
			return;
			var _loc3_:* = null;
			var _loc4_:* = 0;
			/*if (this.getPlayer())
			{
				_loc3_ = this.getPlayer().returnSkillNameBySkillKey(param1);
				if (_loc3_)
				{
					param1 = _loc3_[0];
					_loc4_ = uint(parseInt(_loc3_[1]));
					if (param1 == "dj")
					{
						this.skill_dj(_loc4_);
					}
					else if (param1 == "sd")
					{
						this.skill_sd(_loc4_ / 1.463);
					}
					else if (param1 == "zznh")
					{
						this.skill_zznh(_loc4_);
					}
					else if (param1 == "syzq")
					{
						this.skill_syzq(_loc4_);
					}
					else if (param1 == "ssp")
					{
						this.skill_ssp(_loc4_);
					}
					else if (param1 == "jsp")
					{
						this.skill_jsp(_loc4_);
					}
					else if (param1 == "dgq")
					{
						this.skill_dgq(_loc4_);
					}
					else if (param1 == "xgq")
					{
						this.skill_xgq(_loc4_);
					}
					else if (param1 == "tmc")
					{
						this.skill_tmc(_loc4_);
					}
					if (this.curAddEffect.hasEffect(BaseAddEffect.MONSTER65_AOE) || this.curAddEffect.hasEffect(BaseAddEffect.MONSTER129Buff))
					{
						this.reduceHp(_loc4_);
					}
				}
			}*/
		}
		
		override public function normalAttack():void
		{
			var t:uint = getTimer();
			if (this.timers <= 0)
			{
				if (!this.isInSky())
				{
					if (!this.isRunning() && (!this.isAttacking() || this.isNormalHit()))
					{
						this.timers = 13;
						if (t - timerDict.lastAttackTime > 25 * 60)
						{
							this.normalAttackNum = 1;
						}
						else if (++this.normalAttackNum > 3)
						{
							this.normalAttackNum = 1;
						}
						SoundManager.playSound("Role3_hit" + this.normalAttackNum);
						if (this.normalAttackNum == 1)
						{
							this.setAction("hit2");
							this.lastHit = "hit2";
						}
						else if (this.normalAttackNum == 2)
						{
							this.setAction("hit1");
							this.lastHit = "hit1";
						}
						else if (this.normalAttackNum == 3)
						{
							this.lastHit = "hit3";
							this.setAction("hit3");
						}
						
					}
					else if (this.isRunning() && !this.isAttacking())
					{
						keyInput.cancelRun();
						this.normalAttack();
					}
				}
				else
				{
					this.timers = 15;
					this.setAction("hit1");
					this.lastHit = "hit1";
					this.normalAttackNum = 0;
					SoundManager.playSound("Role3_hit3");
					
				}
			}
			timerDict.lastAttackTime = t;
		}
		
		override public function refreshTitle():void
		{
			var _loc1_:uint = this.getCurClothId();
			var _loc2_:uint = this.getCurWeaponId();
			var _loc3_:Array = BaseBitmapDataPool.getRoleBitmapDataArrayByName("ROLE3_" + _loc1_);
			if (_loc3_)
			{
				this.bbdc.replaceBitmapDataByName("body", _loc3_);
			}
			_loc3_ = BaseBitmapDataPool.getRoleBitmapDataArrayByName("ROLE3_EQUIP_" + _loc2_);
			if (_loc3_)
			{
				this.bbdc.replaceBitmapDataByName("equip", _loc3_);
			}
			super.refreshTitle();
		}
		
		override public function isNormalHit():Boolean
		{
			return this.curAction == "hit1" || this.curAction == "hit2" || this.curAction == "hit3" || this.curAction == "hit4" || this.curAction == "hit5";
		}
		
		override public function upGrade(param1:Boolean = true):void
		{
			super.upGrade(param1);
			roleProperties.hpMax = 100 + 70 * (roleProperties.level - 1);
			roleProperties.mpMax = 35 + 15 * (roleProperties.level - 1);
			roleProperties.atk = 20 + 6 * (roleProperties.level - 1);
			roleProperties.def = 5 + (roleProperties.level - 1);
			roleProperties.setFullState();
			roleProperties.initAll();
		}
		
		override public function getRealPower(param1:String, param2:Boolean = true):int
		{
			var _loc3_:int = 0;
			var _loc4_:* = null;
			var _loc5_:* = 1;
			var _loc6_:EquipmentVO = null;
			var _loc7_:Number = 1;
			var _loc8_:int = 1;
			if (this.isGXP)
			{
				_loc5_ = 1.5;
			}
			var _loc9_:int = 1;
			if (param2 && Math.random() <= this.getCrit() / 100)
			{
				_loc9_ = 2;
			}
			var _loc10_:Number = 1;
			if (this.isHit6Ok)
			{
				_loc10_ = 1 + 0.1 * this.player.returnSkillLevelBySkillName("zznh");
				this.isHit6Ok = false;
			}
			switch (param1)
			{
				case "hit1":
				case "hit2":
				case "hit3":
					_loc8_ = 1.478 * this.getAtk() * _loc9_ * _loc5_ * _loc10_;
					break;
				case "hit4":
					_loc7_ = this.player.returnSkillLevelBySkillName("dj");
					_loc8_ = 44.989 * Math.pow(Math.E, 0.465 * _loc7_) + 1.415 * Math.pow(Math.E, 0.122 * _loc7_) * this.getAtk() * _loc9_ * _loc5_ * _loc10_;
					break;
				case "hit5":
					_loc8_ = 0;
					break;
				case "hit6":
					_loc8_ = 0;
					break;
				case "hit7_1":
					_loc8_ = 0;
					break;
				case "hit7_2":
					_loc7_ = this.player.returnSkillLevelBySkillName("syzq");
					_loc8_ = 24.994 * Math.pow(Math.E, 0.465 * _loc7_) + 0.786 * Math.pow(Math.E, 0.126 * _loc7_) * this.getAtk() * _loc9_ * _loc5_ * _loc10_;
					break;
				case "hit8_1":
					_loc8_ = 0;
					break;
				case "hit8_2":
					_loc7_ = this.player.returnSkillLevelBySkillName("ssp");
					_loc8_ = 16.663 * Math.pow(Math.E, 0.465 * _loc7_) + 0.524 * Math.pow(Math.E, 0.124 * _loc7_) * this.getAtk() * _loc9_ * _loc5_ * _loc10_;
					break;
				case "hit9":
					_loc7_ = this.player.returnSkillLevelBySkillName("jsp");
					_loc8_ = 20.828 * Math.pow(Math.E, 0.465 * _loc7_) + 0.655 * Math.pow(Math.E, 0.0906 * _loc7_) * this.getAtk() * _loc9_ * _loc5_ * _loc10_;
					break;
				case "hit10":
					_loc7_ = this.player.returnSkillLevelBySkillName("dgq");
					_loc8_ = 19.226 * Math.pow(Math.E, 0.465 * _loc7_) + 0.604 * Math.pow(Math.E, 0.128 * _loc7_) * this.getAtk() * _loc9_ * _loc5_ * _loc10_;
					break;
				case "hit11":
					_loc7_ = this.player.returnSkillLevelBySkillName("xgq");
					_loc8_ = 19.226 * Math.pow(Math.E, 0.465 * _loc7_) + 0.604 * Math.pow(Math.E, 0.127 * _loc7_) * this.getAtk() * _loc9_ * _loc5_ * _loc10_;
					break;
				case "hit12":
					_loc7_ = this.player.returnSkillLevelBySkillName("tmc");
					_loc8_ = 12.626 * Math.pow(Math.E, 0.385 * _loc7_) + 0.0593 * Math.pow(Math.E, 0.0965 * _loc7_) * this.getHpMax() * _loc9_ * _loc5_ * _loc10_;
					break;
				case "fabao-sword":
					_loc9_ = 1;
					_loc8_ = this.getAtk();
					break;
				case "magicsword2":
					_loc6_ = this.getPlayer().getCurEquipByType("zbfb");
					if (_loc6_ != null && _loc6_.hasElement("木"))
					{
						_loc8_ = 0.0875 * this.getAtk() * Number(_loc6_.level);
					}
					_loc9_ = 1;
					_loc8_ = this.getAtk() * Number(_loc6_.level) * 0.0488;
					break;
				case "fabao-snow":
					_loc6_ = this.getPlayer().getCurEquipByType("zbfb");
					_loc8_ = this.getAtk() * Number(_loc6_.level) * 0.09;
					break;
				case "hitNiumowangSzBuff":
					_loc3_ = 1;
					_loc4_ = this.getPlayer().getCurEquipByType("zbsz");
					if (_loc4_)
					{
						if (_loc4_.equipId == "yxnmwsz")
						{
							_loc3_ = 2;
						}
						else if (_loc4_.equipId == "jlnmwsz")
						{
							_loc3_ = 3;
						}
						else if (_loc4_.equipId == "ssnmwsz")
						{
							_loc3_ = 4;
						}
					}
					_loc8_ = this.getAtk() * _loc9_ * _loc5_ * (0.176 * _loc3_ * _loc3_);
					break;
				case "hitZhuanlunwangSzBuff":
					_loc3_ = 1;
					_loc4_ = this.getPlayer().getCurEquipByType("zbsz");
					if (_loc4_)
					{
						if (_loc4_.equipId == "yxzlwsz")
						{
							_loc3_ = 2;
						}
						else if (_loc4_.equipId == "jlzlwsz")
						{
							_loc3_ = 3;
						}
						else if (_loc4_.equipId == "sszlwsz")
						{
							_loc3_ = 4;
						}
					}
					_loc8_ = this.getAtk() * _loc9_ * _loc5_ * (0.176 * _loc3_ * _loc3_);
					break;
				case "hitTiantingZhanshenSzBuff":
					_loc3_ = 1;
					_loc4_ = this.getPlayer().getCurEquipByType("zbsz");
					if (_loc4_)
					{
						if (_loc4_.equipId == "yxttzssz")
						{
							_loc3_ = 2;
						}
						else if (_loc4_.equipId == "jlttzssz")
						{
							_loc3_ = 3;
						}
						else if (_loc4_.equipId == "ssttzssz")
						{
							_loc3_ = 4;
						}
					}
					_loc8_ = this.getAtk() * _loc9_ * _loc5_ * (0.25 * _loc3_ * _loc3_);
					break;
				case "Pearl":
					_loc6_ = this.getPlayer().getCurEquipByType("zbfb");
					if (_loc6_ != null && _loc6_.hasElement("木"))
					{
						_loc8_ = 1.2 * this.getAtk();
					}
					_loc9_ = 1;
					_loc8_ = this.getAtk() * 0.6;
					break;
				case "fabao-pearl":
					_loc6_ = this.getPlayer().getCurEquipByType("zbfb");
					if (_loc6_ != null && _loc6_.hasElement("木"))
					{
						_loc8_ = Number(_loc6_.level) * 0.0473 * this.getAtk();
					}
					_loc9_ = 1;
					_loc8_ = Number(_loc6_.level) * 0.0315 * this.getAtk();
					break;
				default:
					_loc8_ = 0;
			}
			return _loc8_;
		}
		
		override protected function isCannotMoveWhenAttackOnFloor():Boolean
		{
			return this.curAction == "hit1" || this.curAction == "hit2" || this.curAction == "hit3" && this.jumpCount == 0 || this.curAction == "hit4" || this.curAction == "hit7" || this.curAction == "hit8" || this.curAction == "hit9" || this.curAction == "hit11" || this.curAction == "hit11Frame2" || this.curAction == "hit12";
		}
		
		override public function isAttacking():Boolean
		{
			return this.curAction == "hit1" || this.curAction == "hit2" || this.curAction == "hit3" || this.curAction == "hit4" || this.curAction == "hit5" || this.curAction == "hit6" || this.curAction == "hit7" || this.curAction == "hit8" || this.curAction == "hit9" || this.curAction == "hit10" || this.curAction == "hit11" || this.curAction == "hit11Frame2" || this.curAction == "hit12";
		}
		
		override public function isCanMoveWhenAttack():Boolean
		{
			return this.curAction == "hit5" || this.curAction == "hit10";
		}
		
		private function doHit1(param1:uint, param2:Point):void
		{
			var _loc3_:FollowTargetBullet = new FollowTargetBullet("Role3Bullet1");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit1");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit2(param1:uint, param2:Point):void
		{
			var _loc3_:FollowTargetBullet = new FollowTargetBullet("Role3Bullet2");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit2");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit3(param1:uint, param2:Point):void
		{
			var _loc3_:FollowTargetBullet = new FollowTargetBullet("Role3Bullet3");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit3");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit4(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role3_hit4");
			var _loc3_:FollowTargetBullet = new FollowTargetBullet("Role3Bullet4");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit4");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit5(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role3_hit5");
			var _loc3_:FollowTargetBullet = new FollowTargetBullet("Role3Bullet5");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDisable();
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit5");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
			if (this.curAddEffect)
			{
				this.curAddEffect.addEffects([{"name": BaseAddEffect.BAJIE_DUNPAI_BUFF, "time": gc.frameClips * 10}]);
			}
		}
		
		private function doHit6(param1:uint, param2:Point):void
		{
			var bb:FollowTargetBullet;
			var direct:uint = param1;
			var p:Point = param2;
			SoundManager.playSound("Role3_hit6");
			bb = new FollowTargetBullet("Role3Bullet6");
			bb.x = p.x;
			bb.y = p.y;
			bb.setOwner(this);
			bb.setDisable();
			bb.setDirect(direct);
			bb.setAction("hit6");
			gc.gameScene.addChild(bb);
			magicBulletArray.push(bb);
			gc.oppositeArray = gc.pWorld.getMonsterArray();
			for each (var mon:BaseMonster in gc.oppositeArray)
			{
				if (!mon.isInvincible())
				{
					if(!(mon as BaseMonster).mavo.isStatic)
					{
						mon.setLostGravity();
						TweenMax.to(mon, 1.8, {
							"x"               : this.x,
							"y"               : this.y - 100,
							"onComplete"      : function (param1:BaseObject):*
							{
								param1.resetGravity();
							},
							"onCompleteParams": [mon]
						});
					}
				}
			}
			this.isHit6Ok = true;
		}
		
		private function doHit7_1(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role3_hit7");
			var _loc3_:FollowTargetBullet = new FollowTargetBullet("Role3Bullet7_1");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDisable();
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit7_1");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit7_2(param1:uint, param2:Point):void
		{
			var _loc3_:SpecialEffectBullet = new SpecialEffectBullet("Role3Bullet7_2");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit7_2");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit8_1(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role3_hit8");
			var _loc3_:FollowTargetBullet = new FollowTargetBullet("Role3Bullet8_1");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDisable();
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit8_1");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit8_2(param1:uint, param2:Point):void
		{
			var _loc3_:SpecialEffectBullet = new SpecialEffectBullet("Role3Bullet8_2");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit8_2");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit9(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role3_hit9");
			var _loc3_:SpecialEffectBullet = new SpecialEffectBullet("Role3Bullet9");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit9");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit10(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role3_hit10");
			var _loc3_:FollowTargetBullet = new FollowTargetBullet("Role3Bullet10");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit10");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit11(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role3_hit11");
			var _loc3_:FollowTargetBullet = new FollowTargetBullet("Role3Bullet11");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit11");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit12_1(param1:uint, param2:Point):void
		{
			SoundManager.playSound("Role3_hit12_1");
			var _loc3_:FollowTargetBullet = new FollowTargetBullet("Role3Bullet12_1");
			_loc3_.x = param2.x;
			_loc3_.y = param2.y;
			_loc3_.setOwner(this);
			_loc3_.setDisable();
			_loc3_.setDirect(param1);
			_loc3_.setAction("hit12");
			gc.gameScene.addChild(_loc3_);
			this.magicBulletArray.push(_loc3_);
		}
		
		private function doHit12_2(param1:*, param2:*, param3:Point = null, param4:uint = 10):void
		{
			var _loc5_:*;
			var _loc6_:StabBullet = null;
			var _loc7_:* = null;
			var _loc8_:* = null;
			var _loc9_:Number = NaN;
			SoundManager.playSound("Role3_hit12_2");
			for each (_loc5_ in this.magicBulletArray)
			{
				if (_loc5_.getImcName() == "Role3Bullet12_1")
				{
					if (_loc5_.getImgMc())
					{
						_loc5_.getImgMc().gotoAndPlay(154);
					}
				}
			}
			if (gc.sid == this.sid || gc.isSingleGame())
			{
				gc.oppositeArray = gc.pWorld.getMonsterArray();
				if (this.isGXP)
				{
					param4 = 20;
					this.attackBackInfoDict["hit12"]["addprotection"] = 0.51;
				}
				else
				{
					param4 = 10;
					this.attackBackInfoDict["hit12"]["addprotection"] = 1;
				}
				param3 = !!(_loc8_ = gc.oppositeArray[int(Math.random() * gc.oppositeArray.length)] as BaseObject) ? new Point(_loc8_.x, _loc8_.y) : new Point(this.x + 1, this.y + 5 * 60);
			}
			else
			{
				param3 = !!param3 ? param3 : new Point(this.x + 1, this.y + 5 * 60);
			}
			var _loc10_:int = 0;
			var _loc11_:Boolean = false;
			if (this.isHit6Ok)
			{
				_loc11_ = true;
			}//判断是否放过战争怒吼
			while (_loc10_ < param4)
			{
				_loc9_ = 360 / param4 * _loc10_;
				_loc7_ = new Point(param2.x + Math.sin(_loc9_ * Math.PI / 180) * 100, Number(param2.y) - Math.cos(_loc9_ * Math.PI / 180) * 100);
				(_loc6_ = new StabBullet("Role3Bullet12_2", param3, 0.3, _loc7_)).setOwner(this);
				_loc6_.setIsDestroyWhenLastFrame(false);
				_loc6_.setAction("hit12");
				_loc6_.rotation = _loc9_;
				_loc6_.x = _loc7_.x;
				_loc6_.y = _loc7_.y;
				if (_loc11_)
				{
//					_loc6_.setHurtAdd(0.3);
				}
				gc.gameScene.addChild(_loc6_);
				this.magicBulletArray.push(_loc6_);
				_loc10_++;
			}
		}
		
		private function skill_dj(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.lastHit = "hit4";
			this.setAction("hit4");
			this.normalAttackNum = 0;
			
			roleProperties.reduceMp(param1);
		}
		
		private function skill_sd(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.lastHit = "hit5";
			this.setAction("hit5");
			
			this.normalAttackNum = 0;
			roleProperties.reduceMp(param1);
		}
		
		private function skill_zznh(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.lastHit = "hit6";
			this.setAction("hit6");
			this.normalAttackNum = 0;
			roleProperties.reduceMp(param1);
		}
		
		private function skill_syzq(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.lastHit = "hit7";
			this.setAction("hit7");
			this.normalAttackNum = 0;
			
			roleProperties.reduceMp(param1);
		}
		
		private function skill_ssp(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isInSky())
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.lastHit = "hit8";
			this.setAction("hit8");
			this.normalAttackNum = 0;
			
			roleProperties.reduceMp(param1);
		}
		
		private function skill_jsp(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isInSky())
			{
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			if (this.getPlayer().returnSkillLevelBySkillName("jsp") == 10)
			{
				if (Math.random() < 0.3)
				{
					this.attackBackInfoDict["hit9"] = {
						"hitMaxCount"    : 100,
						"attackBackSpeed": [-5, -4],
						"attackInterval" : 7,
						"attackKind"     : "physics",
						"addEffect"      : [{"name": BaseAddEffect.STUN, "time": gc.frameClips * 2}]
					};
				}
				else
				{
					this.attackBackInfoDict["hit9"] = {
						"hitMaxCount"    : 100,
						"attackBackSpeed": [-5, -4],
						"attackInterval" : 7,
						"attackKind"     : "physics"
					};
				}
			}
			this.lastHit = "hit9";
			this.setAction("hit9");
			this.normalAttackNum = 0;
			
			roleProperties.reduceMp(param1);
		}
		
		private function skill_dgq(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.lastHit = "hit10";
			this.setAction("hit10");
			
			this.normalAttackNum = 0;
			roleProperties.reduceMp(param1);
		}
		
		private function skill_xgq(param1:uint):void
		{
			if (this.roleProperties.mp < param1)
			{
				return;
			}
			if (this.isAttacking() || this.isBeAttacking())
			{
				return;
			}
			this.lastHit = "hit11";
			this.setAction("hit11");
			
			this.normalAttackNum = 0;
			roleProperties.reduceMp(param1);
		}
		
		override public function stepKeyInput():void
		{
			super.stepKeyInput();
			if(keyInput.isAttack())
			{
				if(isRunning())
				{
					normalAttack();
				}
				else
				{
					normalAttack();
				}
			}
		}
		
		private function skill_tmc(param1:uint):void
		{
			if (this.isAttacking() && this.curAction != "hit12" || this.isBeAttacking())
			{
				return;
			}
			if (this.lastHit == "hit12" && this.getBBDC().getCurFrameCount() <= 130)
			{
				this.lastHit = "hit12_2";
				this.getBBDC().setCurFrameCount(0);
				this.doHit12_2(this.getBBDC().getDirect(), new Point(this.x, this.y));
			}
			else if (this.lastHit != "hit12_2" && this.lastHit != "hit12")
			{
				if (this.roleProperties.mp < param1)
				{
					return;
				}
				this.lastHit = "hit12";
				this.setAction("hit12");
				this.normalAttackNum = 0;
				roleProperties.reduceMp(param1);
			}
		}
	}
}
